From 43034790e0529de8f032edb1e228c4d5ee64bda6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Florian=20M=C3=BCllner?= Date: Tue, 28 Apr 2026 12:25:15 +0200 Subject: [PATCH] Add goblint configuration When discussing goblint on Matrix, there were some concerns around its rules for defining properties: - having to explicitly track the last property ID, instead of including N_PROPS in the anonymous enum - including read-only properties in set() and write-only in get() adds unreachable code, which is bad for code coverage Those were considered more important than the benefit of checking get()/set() with `-Wswitch-enum`, so at least for now stick with the existing property conventions. Add a configuration that enables "legacy" style for the corresponding rules. Part-of: --- goblint.toml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 goblint.toml diff --git a/goblint.toml b/goblint.toml new file mode 100644 index 000000000..e12c910a6 --- /dev/null +++ b/goblint.toml @@ -0,0 +1,7 @@ +[rules.property_enum_convention] +style = "legacy" + +[rules.property_switch_exhaustiveness] +style = "legacy" +readable_flags = ["ST_PARAM_READABLE", "ST_PARAM_READWRITE"] +writable_flags = ["ST_PARAM_WRITABLE", "ST_PARAM_READWRITE"] -- 2.39.5